using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace Publicuse.Entity.AttributeUtil
{
    /// <summary>
    /// 字段别名属性
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = true)]
    public class NameAttribute : BaseMappingAttribute
    {
        public NameAttribute(string name) : base(name)
        {
        }
    }

    /// <summary>
    /// 字段描述属性
    /// </summary>
    public class RemarkAttribute : Attribute
    {
        private string name { get; set; }

        public RemarkAttribute(string name)
        {
            this.name = name;
        }
        public string GetName { get { return this.name; } }
    }

    /// <summary>
    /// 数据库表所属架构
    /// </summary>
    public class SchemaAttribute : Attribute
    {
        private string name { get; set; }

        public SchemaAttribute(string name)
        {
            this.name = name;
        }
        public string GetName { get { return this.name; } }

    }


    /// <summary>
    /// 属性基类
    /// </summary>
    public class BaseMappingAttribute : Attribute
    {
        private string _MappingName = null;
        public BaseMappingAttribute(string mappingName)
        {
            this._MappingName = mappingName;
        }
        public string GetMappingName()
        {
            return this._MappingName;
        }
    }
}
